package com.yan.club.sys.mapper;

import com.yan.club.sys.dto.SysDictTypeDto;
import com.yan.club.sys.model.SysDictType;
import com.yan.club.sys.model.SysDictTypeExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 彦
 * @since 2024/2/7 14:23
 */
@Mapper
public interface SysDictTypeMapper {
    long countByExample(SysDictTypeExample example);

    int deleteByExample(SysDictTypeExample example);

    /**
     * delete by primary key
     *
     * @param dictId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long dictId);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(SysDictType record);

    int insertOrUpdate(SysDictType record);

    int insertOrUpdateSelective(SysDictType record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(SysDictType record);

    List<SysDictType> selectByExample(SysDictTypeExample example);

    /**
     * select by primary key
     *
     * @param dictId primary key
     * @return object by primary key
     */
    SysDictType selectByPrimaryKey(Long dictId);

    int updateByExampleSelective(@Param("record") SysDictType record, @Param("example") SysDictTypeExample example);

    int updateByExample(@Param("record") SysDictType record, @Param("example") SysDictTypeExample example);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(SysDictType record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(SysDictType record);

    int updateBatch(List<SysDictType> list);

    int updateBatchSelective(List<SysDictType> list);

    int batchInsert(@Param("list") List<SysDictType> list);

    /**
     * 根据条件分页查询字典类型
     *
     * @param dictType 字典类型信息
     * @return 字典类型集合信息
     */
    List<SysDictType> selectDictTypeList(SysDictTypeDto dictType);

    /**
     * 修改字典类型信息
     *
     * @param dictType 字典类型信息
     * @return 结果
     */
    int updateDictType(SysDictType dictType);

    /**
     * 新增字典类型信息
     *
     * @param dictType 字典类型信息
     * @return 结果
     */
    int insertDictType(SysDictType dictType);

}